package com.wenzhi.studentservice.beanuse;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

// .properties + @PropertySource + @ConfigurationProperties
@Component
@PropertySource("classpath:/config/mail.properties")
@ConfigurationProperties(prefix = "mail")
@Data
public class MailProperties {
    private String host;
    private Integer port;
    private Smtp smtp;
    private String from;
    private String username;
    private String password;
}
